package StratelegoGame;
import java.awt.Dimension;
/**
 * The game runner. This should be the only class with a 
 * static main method.
 * @author Jace Ferguson
 * @filename StratelegoGame.java
 *
 */
public class StratelegoGame {

	/**
	 * Start the game.
	 * @param args
	 */
	public static void main(String args[])
	{
		//Show the splash window
		new StratelegoSplash();

		//Freeze the program while the splash displays.
		try{
			Thread.sleep(3500);			 
		}
		catch(InterruptedException e){}
		new StratelegoGame();

	}
	/**
	 * Constructor to show the app window and add board and hoard
	 */
	public StratelegoGame()
	{
		BoardGame game = new BoardGame();
		game.setBoard(this.setupBoard());
		game.setPieceHoard(this.setupHoard());
		game.setupConnection();	
	}
	/**
	 * Setup the 2d board and return it.
	 * @return GameBoard2D	board
	 */
	public GameBoard2D setupBoard()
	{
		GameBoard2D board = new GameBoard2D(10, 10);
		//board.setBackgroundImage("images/background.jpg");
		board.setMaximumSize(new Dimension(400, 400));
		//board.recalculateBoard();
		return board;

	}	
	/**
	 * Setup the 2d hoard and return it.
	 * @return	GameBoard2DPieceHoard hoard
	 */
	public GameBoard2DPieceHoard setupHoard()
	{
		GameBoard2DPieceHoard hoard = new GameBoard2DPieceHoard(4, 10);
		hoard.setMaximumSize(new Dimension(300, 125));
		return hoard;
	}
}


